Apple Shared Library Manager 2.0 Change History (old)
================================================
This file contains the oldest changes since ASLM 1.1.1 that no longer fit into the Change History doucment.
All changes that only affect the PowerPC version of ASLM are preceded with "PowerPC:" and all changes that only affect the 68K version of ASLM are preceded with "68K:".
If you have any questions please AppleLink Gary Hornbuckle, the Apple Shared Library Manager Product Marketing Manager, at HORNBUCKLE1. Technical questions and bug reports should be sent to DEVSUPPORT. Please cc: HORNBUCKLE1 in this case.
============================
Changes for 2.0b3 - 7/13/94
68k: Fixed problem with the Makefile.ExampleLibrary.SC makefile referencing a folder that had not been created yet.
If -help is passed to BuildSharedLibrary, it will no longer report an error after displaying the help text.
Fixed up library unloading code to better handle cleaning up after a shared library fails to load. This includes: allowing exceptions to be thrown by InitProcs and Static Constructors (along with CleanupProcs and Static Destructors); fixing some bugs that turned up if a library failed to load at a bad point during the load process; calling the CleanupProc if the InitProc has been called successfully; and calling all static destructors for static objects in a given file if ALL static constructors in the file were also successfully called (because of the way C++ handles construction of static objects, this was only possible on a file-by-file basis and not an object-by-object basis).
Make GetSLMVersion() work if even if InitLibraryManager() has not been called yet. It stopped working a few builds ago.
============================
Changes for 2.0b2 - 6/24/94
68k: Fixed ASLM Installer so it will install properly onto an A/UX machine.
Fixed some ASLM Installer problems with not reporting errors very well. Made descriptive text clearer.
PowerPC: Fixed the ASLM Installer (the ShutDownActionAtom) so it shuts down both the 68k and PowerPC dynamic library file registration feature. It was only doing this for 68k.
PowerPC: Added -xcoffSymFile option to BuildSharedLibrary so xcoff files can be used as symfile instead of using MakeSym.
Fixed an incompatibility between ASLM and newer versions of Stuffit SpaceSaver that caused system slow downs.
68k: Fixed a problem with Makefile.Examples.SC using LibraryManager.o instead of SCLibraryManager.o and using an absolute path name to reference SCLibC.o.
68k: In LibraryManager.h, MPWC was being defined as _cdecl when being included by the Symantec C compiler. It should only be defined as _cdecl for Symantec C++ compilers and left empty otherwise.
68k: Fixed a problem with the math libraries in the MPW Libraries library file not working properly unless the client was compiled with the -mc68881 option and was run on a machine with a math co-processor or the client was compiled without the -mc68881 option and was run on a machine without a math co-processor.
PowerPC: Fixed the LibraryBuilderPPC tool so it fails gracefully if it runs out of disk space or memory.
PowerPC: Fixed the LibraryBuilderPPC tool so it calls SpinCursor() much more frequently. Large library files where causing the cursor to not spin for long periods of time and prevented multifinder switches during this period.
PowerPC: Fixed the LibraryBuilderPPC so it is not such a memory hog. It was allocating about three times as much memory as it needed.
Fixed LibraryBuilder and LibraryBuilderPPC so they always leaves at least 50k of Process Manager memory free.
Fixed GetClientData() so it can be called from the library's InitProc and from the constructors of static objects.
In LibraryManagerUtilities.h, got rid of trailing ";" on extern "C" closing bracket and inline declarations. They were causing Metrowerks to give a warning.
PowerPC: In LibraryManagerClass.h, made TTraceLog, TRequestToken and TPoolNotifier have the same object layout as for 68k.
PowerPC: Fixed runtime support for memory=HOLD option.
============================
Changes for 2.0a5/b1 - 5/26/94
PowerPC: Fixed a bug revealed in 2.0a4 by another bug fix. It was causing the last vtable entry to not point to the virtual function if the function was one that was inherited from a class in another shared library.
============================
Changes for 2.0a4 - 5/23/94
Fixed both runtime and LibraryBuilder bugs with declaring C++ classes using the struct keyword and then exporting them. The runtime would crash if the struct had no virtual functions and LibraryBuilder would complain if there were any virtual functions.
Fixed a bug with LibraryBuilder not being able to deal with explicit exports of pascal methods.
NewObject() now takes a TMemoryPool* parameter rather than a TStandardPool*. This will not affect existing code at compile time or runtime since TStandardPool is a subclass of TMemoryPool.
BuildSharedLibrary will now abort if LibraryBuilder reports an error.
68k: Fixed a bug in TBitmap::GetNextFreeBit() that was introduced earlier in ASLM 2.0.
68k: Fixed a bug that caused ASLM to crash if a jump table was greater then 32K in size.
68k: Fixed a bug in LibraryBuilder that caused it to incorrectly report an error when a class that inherited from SingleObject had only one virtual function in its vtable. LibraryBuilder would complain that the class inherited from SingleObject but had an improper fromat for a SingleObject vtable.
68k: Some changes in ASLM 2.0 made it so THINK clients would get unresolved references for A5Init, A5Size, and _IntEnv when linking. This problem has been fixed.
Fixed a bug in the FixFMAP Installer action atom that sometimes caused the Installer to crash when installing into a System Folder that did not have a Finder.
68k: Fixed a few of bugs with Load/UnloadSegmentByXXX.
•LoadSegmentByXXX would cause the code segment to be loaded multiple times when called while the code segment was already loaded. This could cause the heap the code was loaded into to be used up so other code segments would not load.
•LoadSegmentByXXX was not doing a data cache flush after modifying the jump table and doing the 32-bit relocations. The would often result in strange crashes.
•Segment number range checking was not being done by Load/UnloadSegmentByNumber. This could cause a crash with LoadSegmentByNumber. They will now both return kASLMInvalidSegmentNumberErr.
•UnloadSegmentByXXX was allowing you to try to unload segments in library's that were built with the noSegUnload flag set (which is the default). This usually would eventually cause a crash. They will now return kASLMNotSupportedErr.
PowerPC: The non-debug version of ASLM is now build with -opt local. It is only about 200k now (it was around 400k at one point).
Fixed a bug in the LibraryBuilder macro processor that was causing it not to skip the last line of a multiline macro function. Regular multiline macros worked ok. Macro functions are ignored by ASLM, but since the last line was not being skipped, LibraryBuilder could get confused when reading the last line if it contained something that LibraryBuilder was looking for. In the case of the MacApp 3.1's DeclareClassDesc macro function in UClassDesc.h, the last line contained the code "class name" which lead LibraryBuilder to believe that a class declaration had started.
Added macro support to all keywords that appear in an .exp file. See the "Corrections and Additions to ASLM 1.1.1 Documentation" section in the ASLM 2.0 Supplement document for more details on what macro processing features are supported.
Fixed a bug with the LibraryBuilder macro support of the "pascal" keyword before an exprorted function in the export list. If a macro substitution was used (like trying to define _PDECL to be either "pascal" or nothing at all and then using it in front the the function to export), LibraryBuilder would not expand the macro properly and give an error.
Made LibraryBuilder give a proper warning if the same class is exported twice rather than just saying that the class could not be found.
LibraryBuilder had a bug that could turn up if you intermixed #includes of class declrations with class exports in the .exp file. Once a class was exported, LibraryBuilder removed the class from an internal list of class declarations it had seen. This meant that if you later tried to #include a file that defined a subclass of the already exported class, LibraryBuilder would say that it had not seen the parent class's declaration yet. This bug has been fixed.
PowerPC: TestLibraryPPC and ExampleLibraryPPC will now build properly if you try building them with "-sym off -opt on".
PowerPC: Fixed a bug that made an eventual crash likely once you unloaded and then reloaded the ASLM.
Added TDoubleLong::GetWide() so you can extract both 4-byte longs out of the double long.
A change in ASLM 2.0a2 caused preloading of shared libraries to fail to report an error and abort the load if a dependent library could not be loaded. This has been fixed.
============================
Changes for 2.0a3 - 4/25/94
Fixed a bug with shared libraries not failing to load when they have the loaddeps flag set and a dependent library is not installed. This bug was introduced during 2.0 development and was not in ASLM 1.1.1.
Fixed a bug with LoadSegmentByXXX functions loading a segment again even if it is already loaded.
PowerPC: You now need to use the versions of the MPW PowerPC tools, libraries, and interfaces that were most recent as of 4/22/94.
PowerPC: Fixed a problem with ASLM running into problems if loading was disabled at boot time (by holding the shift key down or disabling extensions) and then you tried using it later on. In this situation ASLM is suppose to load properly the first time someone calls InitLibraryManager(). However, patches were not getting installed properly so some functionality (like dynamic installation of shared library files) was not present. This problem has been fixed.
If you ever tried calling a funtion in a function set or creating an instance of a class and the function set or class could not be found, you would end up in MacsBug (when using the debug version) with a message saying "GetVTableRec failed". This message will now include the class or function set id and version number of the class or function set whose lookup failed.
Old ASLM interfaces are now grouped into a #if SupportOldASLMInterfaces section in LibraryManager.h. Currently SupportOldASLMInterfaces is #defined as 1 if it is not already #define. You should try building with SupportOldASLMInterfaces #defined as 0 so you can remove dependencies to the old interfaces from your code. Note that the interface changes to date have been to error code names and function names. They do not affect backwards comptiblity with ASLM and you will NOT have runtime compatiblity problems if you continue to use them.
68K: When exporting classes from a shared library, BuildSharedLibrary needs to create some new object file records and add them to the "munged" object file it creates out of the input object file. Since object files are only allowed to have 65535 records, it possible that BuildSharedLibrary might not find room to add the records in creates. It used to corrupt the object file in this case. This bug has been fixed to report an error instead. You can make your input object file smaller by having it only contain the implementation of classes and functions that you export. Other classes and functions used by the exported classes and functions but not exported themselves do not need to be part of the input object file. The number of object file records that BuildSharedLibrary creates is (1 + <numclasses> + <numconstructors>) where <numclasses> is the number of classes being exported and <numconstructors> is the total number of constructors in all the classes being exported.
Made the LibraryBuilder tool about 10% faster by building in model far.
68K: Fixed a problem with LibraryManger.n.o having some model far code in it. This problem was introduced in version 2.0 and was not a problem in version 1.1.1.
The ASLM DocViewer documents on the 2.0a2 release accidently had all resources stripped out of them so they would not open. This problem has been fixed.
PowerPC: The AINI resource has been renumbered from -32698 to -32702 so the PPC ASLM will load before the 68k ASLM. The Installer will remove the old AINI(-32698).
The ASLM Installer now uses Installer 4.0. Also, there is only one Installer disk and it will install both the 68k and PPC versions of ASLM on PPC machines and just the 68k version on 68k machines.
PowerPC: Made the -privateFar BuildSharedLibrary option work.
The -near BuildSharedLibrary option has been replaced with -nearClientFile. Likewise, -far was replaced by -farClientFile, -privateNear was replaced by -privateNearClientFile, and -privateFar was replaced by -privateFarClientFile. The old options are still supported for backwards compatibility.
The -clientFile and -privateClientFile BuildSharedLibrary options were added. There main purpose is for specifying client object files when building PowerPC shared libraries (using -farClientFile didn't really make sense). However, they have the same meaning as -farClientFile and -privateFarClientFile and can also be used for 68k builds.
Fixed a bug with TArrayIterator::Next() always returning NULL unless the iterator had a match object
68K: Added support for "emulated" and "!emulated" flags in the Library declaration. If "emulated" is specified then the library will only be registered in cases where it will be run under emulation on a PowerPC. "!emulated" has the opposite affect of causing the library to only be registered on 68k machines. "!emulated" is the default.
68K: Changed TBitMap and also the SetBit(), TestBit(), and ClearBit() so they treat bits from left to right within each byte instead of from right to left. In other words, 0 is now the left most bit within a byte. This way the bitmap layout is the same for both 68k and PPC ASLM.
68K: Made the inline versions of AtomicXXXBoolean funtions return 1 for true instead of 0xFF.
#if processing is now allowed in the .exp file within Class, FunctionSet, and Library declarations. #if processing was previously only allowed outside these declarations.
In LibraryManager.h, the Volatile macro was renamed to VOLATILE and VOLATILE was renamed to Volatile so now VOLATILE is the same as MacApp's VOLATILE. Wherever you were previously using Volatile you should now use VOLATILE.
Renamed ClassID() to CastToClassID(). This was done so there is no conflict with MacApp's ClassID definition. ASLM will #define ClassID to be the same as CastToClassID, but only if it is not already #defined. This means that if you are not using MacApp you can still use ClassID() and if you are using MacApp you cannot use ClassID() and should #include the MacApp headers before LibraryManager.h.
PowerPC: Fixed a problem with ASLM's global new operator having the wrong mangled name so it was not used whenever the statically linked version of the new operator was needed (such as when constructing an array of objects or when GlobalNew.h is not #included).
Added GetObjectsVersion() and GetObjectsMinVersion() which will return the maximum and minimum version supported by the class that the object is an instance of. There are also method versions of these routines for all the TDynamic classes. As with the other GetObjectsXXX() routines, the object must be an instance of a classes exported from a shared library and must have its vtable first.
In NewObject(), if the object's constructor throws an exception, then free the object's memory and set the object pointer to null. Previously the object pointer was still returned even though an error was also returned.
It is no longer necessary for a shared library to link with it's own client object file (.cl.o file), even if the library exports C++ classes. BuildSharedLibrary will now instead place the functions that the library needs from the client object file into another file that is already linked with the shared library automatically (the .init.a file). IMPORTANT: PPCLINK will die with an assertion failure if you continue to link in the client object file. This problem is fixed in the most recent version of PPCLINK (a post b1 version), but it is still advised that you do not link in your client object file when building a PowerPC shared library.
BuildSharedLibrary now provides better and more accurate help output and gives warnings when PowerPC options are used with 68k shared libraries and vice versa.
68K: Fixed up Makefile.Examples.SC to fix a few problems and added a lot of Symantec related commenes to ExampleClass.h.
68K: Add some missing Symantec segments to the list of segments that BuildSharedLibrary and LinkSharedLibrary automatically merge when linking a shared library.
68K: In LibraryManager.h, the THINK_CPLUS and THINK_C defines are checked along with __SC__.
68K: In LibraryManager.h, the MPWC infront of extern "C" routines was removed. It caused the Symantec C compiler to choke because it doesn't like _cdecl and it shouldn't be in front of extern "C" routines anyway.
In LibraryManagerClasses.h, moved the TMemoryPool inlines after the TStandardPool definition so SCpp doesn't complain about one of them doing a cast from a TStandardPool.
ASLM_SCDECLARATION was not always getting declared in LibraryManager.h. It does now.
68K: TSCDyanmic::Trace() was not declared as _cdecl. It is now.
68K: LinkSharedLibrary had lost it's segment merging ability. It has been re-added.
FSInfoGetParentID() was renamed to FSInfoGetInterfaceID() since this name makes more sense. FSInfoGetParentID() is still supported with a #define.
Made UnregisterLibraryFile() first unload all libraries that are not in use before checking to see if any libraries are still in use in the library file.
PowerPC: Clients and shared libraries no longer need to link with GlobalData.xcoff so it has been removed.
Fixed a bug in the ASLM code that unloads a shared library. It was doing a DisposeHandle to dispose the shared library's heap and then doing a DisposeHandle and a ReleaseResource on memory within the heap that was just disposed of. This may have caused crashes with ASLM running with the Modern Memory Manager on PowerPCs. This bug was also fixed in ASLM 1.1.2.
PowerPC: You no longer need to install the 68K version of ASLM if you want the PowerPC ASLM gestalt selector to work or if you want to be able to reload the PowerPC ASLM by using the Inspector.
Changed the ASLM PowerPC gestalt selector from 'ASLM' to 'slmp' since Apple gestalt selectors are suppose to be all lower case.
PowerPC: Fixed LibraryBuilderPPC so it will now check to see if the newly generated client object file is the same as the old one and not replace the old one if they are the same. This is a feature that is already in the 68k version and prevents unecessary mod date changes to the client object file so targets in other makefiles that are dependent on the client object file won't be forced to relink. This is useful when Input Object File passed to LibraryBuilder has changed, but the the shared library still exports the same functions and classes.
PowerPC: Fixed LibraryBuilderPPC so it will not create any of the shared library's intermediate files (including the client object file) if the exports file (.exp file) and Input Object File have not changed. The only thing that will be done is relinking the shared library. This is useful when a makefile determines that a shared library needs to be rebuilt because one of the files it links with has changed. In this case only a relink is necessary. This feature is already in the 68k version.
============================
Changes for 2.0a2 - 3/14/94
Added support for ASLM static objects in applications. See ASLM 2.0 Documentation for details.
PowerPC: Added -makesym option to BuildSharedLibrary and LinkSharedLibrary. See ASLM 2.0 Documentation for details.
68k: Fixed a problem with SCpp destructors crashing if they are not declared as _cdecl. Also, if they are declared as _cdecl then there is a bug in SCpp 6.0.1 that will cause the stack to be wrong after the destructor returns. This will be fixed in the next SCpp release.
68k: Removed ASLM's replacement for the Runtime.o _RTExit routine. It was there to make sure that applications always called CleanupLibraryManager() when quitting, but required that LibraryManager.o be linked in before Runtime.o. InitLibraryManager will now install CleanupLibraryManager() as an "atexit" procedure so CleanupLibraryManager() will always be called when an application quits.
PowerPC: fixed a bug with calling exported routines that have more than 8 parameters.
PowerPC: removed qd global variable from LibraryManagerPPC.o. Applications are suppose to define it themselves.
============================
Changes for 2.0d6 - 3/2/94
PowerPC: Fixed TInterruptScheduler. It wasn't working at all previously.
PowerPC: Fixed last remaining known bug in TTimeScheduler that prevented you from removing scheduled operations.
PowerPC: Added -makepef parameter to BuildSharedLibrary. It is followed by a quoted string and allows you to pass parameters on to MakePef. See ASLM 2.0 Documentation for details.
PowerPC: Fixed a problem with the feature that allows you to export all functions in a shared library by not specifying any classes or function sets in the exports file. BuildSharedLibrary use to fail to assemble the stubs file because invalid symbols where being used.
Fixed a bug that caused the ASLM gestalt selector to crash if ASLM had been installed and then the Shared Library Manager extension was remove from the extensions folder and the machine was rebooted.
Added #defines to LibraryManager.h for the ASLM gestalt selectors (PPC and 68K). See ASLM 2.0 Documentation for details.
Fixed a problem that caused vtables to have _pure_virtual_called in entries that should have had inherited method pointers. This problem would occur if 3 or more classes were invovled in an inheritance chain, 2 of the classes were in the same shared library, one of the classes in the middle of the inheritance chain was in a separate shared library, the library containing the class in the middle of the chain was loaded first, and later you tried to create an instance of the class at the botom of the chain. For example, if A inherits from B which inherits from C, A and C are in Library1 and B is in Library2, something causes LIbrary2 to load before Library1 (like creating an instance of B or using anything else in Library2), and then you create an instance of A, A's vtable would contain _pure_virtual_called for all methods inherited from B and C. If Library1 was loaded before Library2 then this problem did not occur.
Renumbered the 68k AINI resource from 1 to -32700 and the PPC AINI from 3 to -32698 and made the installer scripts remove AINI(1) and AINI(3). This was done to accomodate certain system software services that required ASLM to be loaded slightly earlier than in was being loaded.
PowerPC: Fixed a problem with a patch that cause the TraceMonitor to crash when you quit it.
Added SetSystemAsClient(). See ASLM 2.0 Documentation for details.
Added GetSystemClient(). See ASLM 2.0 Documentation for details.
Added GetLibraryClient(TLibrary*). See ASLM 2.0 Documentation for details.
PowerPC: fixed a problem with the declaration of TLibraryFile in LibraryManagerClasses.h that caused the methods not to work properly.
PowerPC: Made TSimpeList::Add() add the new object to the end of the list instead of the beginning.